<template>
	<view>
		<das-ipt @SearchEvents="searchClick"></das-ipt>
		<!-- 会议列表 -->
		<view class="" v-for="item in list" @tap="$navTo('./details?id='+item.id)">
			<view class="meeting" >
				<view class="img">
					<image v-if="item.image.length>0" :src="item.image[0]" mode=""></image>
					<image v-else src="../../static/word.png" mode="widthFix"></image>
				</view>
				<view class="content">
					<view class="title">{{item.theme}}</view>
					<view class="time">{{item.createtime_text}}</view>
				</view>
			</view>
			<view class="hengxian"></view>
		</view>
		<das-add v-if="login != '协管员'" @func="$navTo('add')"></das-add>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				searchIpt: '',
				flag: true,
				list:[],
				title:'',
				login:''
			}
		},
		onShow() {
			this.init()
			this.login = uni.getStorageSync('login')
		},
		onLoad() {
			
		},
		methods: {
			searchClick(e) {
				this.title = e
				console.log(e);
				this.init()
			},
			init(){
				let _this = this
				uni.request({
					url: this.$url + 'relevant.meeting/getMeetingList',
					method: 'GET',
					header:{
						token:uni.getStorageSync('token')
					},
					data: {
						title:this.title
					},
					success: res => {
						console.log(res);
						_this.list = res.data.data
					},
					fail: () => {},
					complete: () => {}
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.header1{
		display: flex;
		justify-content: space-between;
		align-items: center;
		box-sizing: border-box;
		height: 80rpx;
		width: 100%;
		background-color: #003690;
		padding: 0 40rpx;
		.ipt-box{
			display: flex;
			justify-content: space-between;
			align-items: center;
			box-sizing: border-box;
			padding: 0 20rpx;
			width: 580rpx;
			height: 52rpx;
			background-color: #fff;
			border-radius: 24rpx;
			image{
				width: 32rpx;
				height: 32rpx;
			}
		}
		.header1-right{
			display: flex;
			align-items: center;
			font-size: 28rpx;
			color: #E2ECFB;
			image{
				width: 36rpx;
				height: 36rpx;
			}
		}
	}
	// 列表
	.meeting{
		display: flex;
		align-items: center;
		padding: 16rpx 24rpx;
		.img{
			image{
				width: 120rpx;
				height: 120rpx;
			}
		}
		.content{
			margin-left: 14rpx;
			.title{
				font-size: 30rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #333333;
				opacity: 1;
			}
			.time{
				font-size: 24rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #999999;
				opacity: 1;
			}
		}
	}
	.hengxian{
		width: 700rpx;
		height: 2rpx;
		background-color:  #eee;
		margin: 0 auto;
	}

</style>
